/*
 * This is a helper struct for basic animation frame counting.
 * It can't draw itself.
 */
#include <stdbool.h>

typedef struct {
	int frame;    // current frame nr
	int count;    // total nr of frames in this anim
	int duration; // duration of frames
	int cooldown; // time left for current frame
	bool loops;   // if false, anim will stop on last frame
} Anim;

void anim_init (Anim* anim, int count, int duration, bool loops);
void anim_update (Anim* anim);
